#include <allegro.h>
#include "player.h"
#include "object.h"

player::player(int x, int y, int speed_x, char* nome) {
	this->x = x;
	this->y = y;

	this->speed_x = speed_x;
   
	this->img = load_bitmap(nome, NULL);

	this->w = img->w;
	this->h = img->h;
}

void player::draw(BITMAP* buffer) {
	draw_sprite(buffer, img, x, y);
}

bool player::can_catch() {
	// FIXME
/*	if ( ((x + w > o.x) && (x < o.x + o.w)) && ((y + h > o.y) && (y < o.y + o.h)) ) {
		return true;
	return false;*/

	return true;
}
